$(function(){
    // addMethod("规则名称","回调函数","消息提示")
        $("#reg").validate({
            rules:{
                uname:{
                    required:true,
                    rangelength:[6,16],
                },
                upwd:{
                    required:true,
                    rangelength:[6,16],
                },
                upwd2:{
                    equalTo:"#upwd",
                },
                utel:{
                    required:true,
                    minlength:[11],
                    maxlength:[11],
                }
            },
            messages:{
                uname:{
                    required:"请输入您的名字(必填)",
                    rangelength:"长度{0}-{1}之间",
                },
                upwd:{
                    required:"请输入您的密码(必填)",
                    rangelength:"长度{0}-{1}之间",
                },
                upwd2:{
                    equalTo:"2次密码不一致",
                },
                utel:{
                    required:"请输入您的电话号码",
                    minlength:"长度是11位",
                    maxlength:"手机号超过11位了",
                }
            },
            submitHandler:function(){
                return false;
            }
        });
})